package com.weather.pm.utils;

import com.weather.pm.R;

import android.view.View;


public class IconUtils {
	public static String getIconName(String string){
	
		
		return string.substring(string.lastIndexOf("/")+1, string.lastIndexOf("."));
	}
	
	public static int[] getIconId(String weatherSt){
		int smallId;
		int bigId;
		if(weatherSt.equals("qing")){
			smallId = R.drawable.small_0;
			bigId = R.drawable.big_0;
			}else if (weatherSt.equals("duoyun")) {
				smallId = R.drawable.small_14;
				bigId = R.drawable.big_14;
	
			}else if (weatherSt.equals("yin")) {
				smallId = R.drawable.small_13;
				bigId = R.drawable.big_13;
	
			}else if (weatherSt.equals("leizhenyu")) {
				smallId = R.drawable.small_7;
				bigId = R.drawable.big_7;
			}else if (weatherSt.equals("yujiaxue")) {
				smallId = R.drawable.small_6;
				bigId = R.drawable.big_6;
			}else if (weatherSt.equals("xiaoyu")||weatherSt.endsWith("zhenyu")) {
				smallId = R.drawable.small_10;
				bigId = R.drawable.big_10;
			}else if (weatherSt.equals("zhongyu")) {
				smallId = R.drawable.small_9;
				bigId = R.drawable.big_9;
			}else if (weatherSt.equals("dayu")) {
				smallId = R.drawable.small_8;
				bigId = R.drawable.big_8;
			}else if (weatherSt.equals("xiaoxue")||weatherSt.equals("zhongxue")||
					weatherSt.equals("daxue")||weatherSt.equals("zhenxue")) {
				smallId = R.drawable.small_5;
				bigId = R.drawable.big_5;
	
			}else if (weatherSt.equals("wu")) {
				smallId = R.drawable.small_3;
				bigId = R.drawable.big_3;
			}else if (weatherSt.equals("dongyu")) {
				smallId = R.drawable.small_16;
				bigId = R.drawable.big_16;
			
			}else if (weatherSt.equals("mai")) {
				smallId = R.drawable.small_2;
				bigId = R.drawable.big_2;
			
			}else {
				smallId = R.drawable.small_1;
				bigId = R.drawable.big_1;
			}

		
		
		return new int[]{smallId,bigId};
		
	}

}
